
<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="<?php echo $baseurl?>">Trang chủ</a> <span class="divider">/</span></li>
        <li class="active">Báo cáo</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Báo cáo sử dụng E-coupon</h1> <span></span>
</div>
<div class="maincontent">
    <div class="contentinner">    
    
    	<table class="table table-bordered">
            <colgroup>
                <col class="con0" />
                <col class="con1" />
                <col class="con0" />
                <col class="con1" />
                <col class="con0" />
                <col class="con1" />
                <col class="con0" />
            </colgroup>
            <thead>
                <tr>
                    <th style="width: 8%;">STT</th>
                    <th>Tên E-coupon</th>
					<th>Số lượng</th>
					<th>Đã nhận</th>
                    <th>Hạn sử dụng</th>
                    <th>Trạng thái</th>
                    <th class="centeralign" style="width: 10%">&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <?php $i=1; if(!in_array($data, array(null, '', '0'))):?>
            <?php foreach($data AS $el=>$le):?>
                <tr>
                    <td><?php echo $per_page * $pageg + $i;?></td>
                    <td><?php echo $le->title?></td> 
					<td><?php echo $le->amount?></td>
					<td><?php echo $le->amount_available;?></td>
                    <td><?php echo date('d-m-Y', $le->date_user);?> 
					</td>
                    <td><?php echo $le->active == 1 && $le->date_user > time() ? '<small style="color: #46a73e;font-size: 12px">Hoạt động</small>' : '<small style="color: #FF0000;font-size: 12px">Hết hạn</small>'?>
					<?php if( $le->amount_available >= $le->amount ){ echo '<br><small style="color: #DF2929;font-size: 12px">Đã dùng hết</small>';} ?>
					</td>
                    <td class="centeralign">
                        <a href="<?php echo $baseurl.'manage/ecoupon/report-ecoupon/'.$le->id;?>">Chi tiết sử dụng</a>
                    </td>
                </tr>
            <?php $i++; endforeach;?>
            <?php endif?>
            </tbody>
        </table>
        <div class="dataTables_info" id="dyntable_info">
            <div class="pagination">
                <?php echo $this->pagination->create_links();?> 
            </div>
        </div>
    </div>
</div>
<style>
.table th, .table td {
vertical-align: middle !important;
}
</style>